<script setup lang="ts">
import { WebsiteInfoModel } from '@/api/webSite/response';
import { defineProps } from 'vue';

const { webInfo } = defineProps<{
  webInfo: WebsiteInfoModel
}>();

</script>


<template>
  <div class="slide-container">

    <div class="wrapper">
      <div class="clash-card barbarian">
        <div class="clash-card__image clash-card__image--barbarian">
          <img src="/public/img/project/header_right.png" alt="barbarian" />
        </div>
        <div class="clash-card__level clash-card__level--barbarian"></div>
        <div class="clash-card__unit-name">网站信息</div>
        <div class="clash-card__unit-description">
          {{ webInfo.desc }}
        </div>

        <div class="clash-card__unit-stats clash-card__unit-stats--barbarian clearfix">
          <div class="one-third">
            <div class="stat">{{ webInfo.time }}</div>
            <div class="stat-value">开发时间</div>
          </div>

          <div class="one-third">
            <div class="stat">{{ webInfo.runDay }}</div>
            <div class="stat-value">运行天数</div>
          </div>

          <div class="one-third no-border">
            <div class="stat">{{ webInfo.postCount }}</div>
            <div class="stat-value">文章数量</div>
          </div>

        </div>

      </div>
    </div>
  </div>
</template>
<style scoped lang="scss">
$border-radius-size: 14px;
$barbarian: #EC9B3B;
$archer: #EE5487;
$giant: #F6901A;
$goblin: #82BB30;
$wizard: #4FACFF;

*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  background: linear-gradient(to bottom, rgba(140, 122, 122, 1) 0%, rgba(175, 135, 124, 1) 65%, rgba(175, 135, 124, 1) 100%) fixed;
  background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/195612/coc-background.jpg') no-repeat center center fixed;
  background-size: cover;
  font: 14px/20px "Lato", Arial, sans-serif;
  color: #9E9E9E;
  margin-top: 30px;
}

.slide-container {
  margin: auto;
  width: 600px;
  text-align: center;
}

.wrapper {
  padding-top: 40px;
  padding-bottom: 40px;

  &:focus {
    outline: 0;
  }
}



.clash-card {
  background: white;
  width: 300px;
  display: inline-block;
  margin: auto;
  border-radius: $border-radius-size + 5;
  position: relative;
  text-align: center;
  box-shadow: -1px 15px 30px -12px black;
}

.clash-card__image {
  position: relative;
  height: 230px;
  margin-bottom: 35px;
  border-top-left-radius: $border-radius-size;
  border-top-right-radius: $border-radius-size;
}

.clash-card__image--barbarian {
  img {
    width: 400px;
    position: absolute;
    top: -35px;
    left: -88px;
  }
}

.clash-card__image--archer {

  img {
    width: 400px;
    position: absolute;
    top: -34px;
    left: -37px;
  }
}

.clash-card__image--giant {

  img {
    width: 340px;
    position: absolute;
    top: -30px;
    left: -25px;
  }
}

.clash-card__image--goblin {

  img {
    width: 370px;
    position: absolute;
    top: -21px;
    left: -37px;
  }
}

.clash-card__image--wizard {

  img {
    width: 345px;
    position: absolute;
    top: -28px;
    left: -10px;
  }
}

.clash-card__level {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.clash-card__level--barbarian {
  color: $barbarian;
}

.clash-card__level--archer {
  color: $archer;
}

.clash-card__level--giant {
  color: $giant;
}

.clash-card__level--goblin {
  color: $goblin;
}

.clash-card__level--wizard {
  color: $wizard;
}

.clash-card__unit-name {
  font-size: 26px;
  color: black;
  font-weight: 900;
  margin-bottom: 5px;
}

.clash-card__unit-description {
  padding: 20px;
  margin-bottom: 10px;
  color: black;
}

.clash-card__unit-stats--barbarian {
  background: $barbarian;

  .one-third {
    border-right: 1px solid #BD7C2F;
  }
}

.clash-card__unit-stats--archer {
  background: $archer;

  .one-third {
    border-right: 1px solid #D04976;
  }
}

.clash-card__unit-stats--giant {
  background: $giant;

  .one-third {
    border-right: 1px solid darken($giant, 8%);
  }
}

.clash-card__unit-stats--goblin {
  background: $goblin;

  .one-third {
    border-right: 1px solid darken($goblin, 6%);
  }
}

.clash-card__unit-stats--wizard {
  background: $wizard;

  .one-third {
    border-right: 1px solid darken($wizard, 6%);
  }
}

.clash-card__unit-stats {

  color: white;
  font-weight: 700;
  border-bottom-left-radius: $border-radius-size;
  border-bottom-right-radius: $border-radius-size;

  .one-third {
    width: 33%;
    float: left;
    padding: 20px 15px;
  }

  sup {
    position: absolute;
    bottom: 4px;
    font-size: 45%;
    margin-left: 2px;
  }

  .stat {
    position: relative;
    font-size: 24px;
    margin-bottom: 10px;
  }

  .stat-value {
    text-transform: uppercase;
    font-weight: 400;
    font-size: 12px;
  }

  .no-border {
    border-right: none;
  }
}

.clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}

.slick-prev {
  left: 100px;
  z-index: 999;
}

.slick-next {
  right: 100px;
  z-index: 999;
}
</style>
